//
// Created by Administrator on 2015/6/3.
//

#include "../extra/cata.h"
#include "../es_util.h"



int main()
{
    //for(int i = 0; i < 100; ++i)
    {
        CData a, c, d;
        c = 10;
        cout<<c<<endl;
        c = 3.15f;
        cout<<c<<endl;
        c = 'A';
        cout<<c<<endl;
        c[0] = 5;
        c[1] = 'A';
        a.deep_copy(c);
        c["name"] = "yangyang";
        c["age"] = 27;
        cout<<a.to_json()<<endl;
        cout<<c.to_json()<<endl;
        d[0] = std::move(c);
        d[1] = std::move(a);
        CData e;
        e[0]["first"] = "gold";
        e[0]["second"] = "silver";
        d[2] = std::move(e);

        cout<<d<<endl;
        cout<<d.to_json()<<endl;
        cout<<"d[2][0] has key first:"<<d[2][0].has_key("first")<<endl;
        cout<<"d[2][0] has key name:"<<d[2][0].has_key("name")<<endl;
        cout<<"get cpu core count:"<<esvr::get_cpu_core_count()<<endl;
    }
    return 0;
}

